import requests
from random import randint

class IP(object):
    def __init__(self):
        self.ip_list = requests.get('http://120.79.85.144/index.php/api/entry?method=proxyServer.tiqu_api_url&packid=1&qty=10&format=list&usertype=20').text.split('\r\n')
    
    def random_ip(self):
        ip = self.ip_list[randint(0,9)]
        return ip


if __name__ == '__main__':
    ip_obj = IP()
    ip = ip_obj.random_ip()
    print(ip)